{extend name="layout/common_layout" /}
{block name="body"}
<!--tab标签-->
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">个人认证管理</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form layui-form-pane" action="{:url('admin/personalreal/index')}" method="get">
                <div class="layui-inline">
                    <label class="layui-form-label">关键词</label>
                    <div class="layui-input-inline">
                        <input type="text" name="keyword" value="{$keyword}" placeholder="昵称 电话" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn">搜索</button>
                </div>
                <div class="layui-inline">
                    <label class="layui-input-inline">认证总人数：</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$allnum}人"class="layui-input" style="color: #0C0C0C">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-input-inline">待审核人数：</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$waitnum}人"class="layui-input" style="color:red">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-input-inline">通过人数：</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$passnum}人"class="layui-input" style="color: #0BB20C">
                    </div>
                </div>
            </form>
            <hr>
            <table class="layui-table">
                <thead>
                <tr>
                    <th style="width: 30px;">ID</th>
                    <th>手机号</th>
                    <th>邮箱</th>
                    <th>昵称</th>
                    <th>真实姓名</th>
                    <th>身份证正面</th>
                    <th>身份证反面</th>
                    <th>手持身份证</th>
                    <th>认证状态</th>
                    <th>认证时间</th>
                    <th>审核时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {foreach name="list" item="vo"}
                <tr>
                    <td>{$vo.prn_id}</td>
                    <td>{$vo.u_phone}</td>
                    <td>{$vo.u_email}</td>
                    <td>{$vo.u_nickname}</td>
                    <td>{$vo.prn_real_name}</td>
                    <td class="positive"><img src="{$vo.prn_id_positive}" style=" width: 50px; height: 50px;"><input type="hidden" value="{$vo.prn_id_positive}"></td>
                    <td class="other_side"><img src="{$vo.prn_id_other_side}" style=" width: 50px; height: 50px;"><input type="hidden" value="{$vo.prn_id_other_side}"></td>
                    <td class="hold_img"><img src="{$vo.prn_id_hold_img}" style=" width: 50px; height: 50px;"><input type="hidden" value="{$vo.prn_id_hold_img}"></td>
                    {if condition="$vo['prn_status']==1"}
                        <td style="color: #0C0C0C;">待认证</td>
                    {/if}
                    {if condition="$vo['prn_status']==2"}
                        <td style="color: #0BB20C;">已认证 </td>
                    {/if}
                    {if condition="$vo['prn_status']==3"}
                        <td style="color:red;">认证失败 </td>
                    {/if}
                    <td>{$vo.prn_created_time|date="Y-m-d H:i:s",###}</td>
                    <td>
                        {if condition="$vo['prn_update_time'] != ''"}
                            {$vo.prn_update_time|date="Y-m-d H:i:s",###}
                        {/if}
                    </td>
                    <td>
                        {if condition="$vo['prn_status'] == 1"}
                            <a href="{:url('admin/personalreal/authenticationPass',['prn_id'=>$vo['prn_id'], 'prn_status' => 3, 'prn_uid' => $vo['prn_uid']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-confim">不通过</a>
                            <a href="{:url('admin/personalreal/authenticationPass',['prn_id'=>$vo['prn_id'], 'prn_status' => 2, 'prn_uid' => $vo['prn_uid']])}" class="layui-btn layui-btn-normal layui-btn-mini ajax-confim">通过</a>
                        {/if}
                    </td>
                </tr>
                {/foreach}
                </tbody>
            </table>
            <img src="" alt=""  id="image" style="display: none; border-width:1px; border-style:solid; width: 500px; height: 500px; text-align:center;margin: 0px auto;">
            <!--分页-->
            {$list->render()}
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script>
    $(".positive").click(function(){
        var url = $(this).find('input').val();
        $("#image").css('display', 'block').attr('src', url);
    })

    $(".other_side").click(function(){
        var url = $(this).find('input').val();
        $("#image").css('display', 'block').attr('src', url);
    })

    $(".hold_img").click(function(){
        var url = $(this).find('input').val();
        $("#image").css('display', 'block').attr('src', url);
    })


    $("#image").click(function () {
        $("#image").css('display', 'none')
    })

</script>
{/block}